﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace SaleOnlineSystem.Controls
{
    public partial class GroupParent : System.Web.UI.UserControl
    {
        public int catid;
        public string title;
        //public GroupParent(int idcat)
        //{
        //    // Load du lieu theo icat 
        //}
        protected void Page_Load(object sender, EventArgs e)
        {
            // Load tat ca cac cat co cat cha la cat id;


            DataTable dt = DAL.DCollector.DBCollector.Instance.StoredProcedureSelectByColumns("tbl_Category", " * ", "selectbycolumns");
            DataView dv = dt.DefaultView;
            dv.RowFilter = "Category_ID2=" + catid;
            DataTable temp = dv.ToTable();

            rpt_groupparent.DataSource = temp;
            rpt_groupparent.DataBind();
        }
    }
}